package com.xmad.ksadutils.AdSDK.AdBase;

import android.app.Activity;
import android.widget.FrameLayout;

public abstract class AdBase {
    public  static final String TAG = "AdBase";
    public  AdListener listener;
    public  String[] PGid;
    public  Long[] KSid;
    public  String[] Bdid;
    public  boolean reveal;
    public  Activity activity;
    public  FrameLayout frameLayout;
    public AdBase setListener(AdListener listener) {
        this.listener = listener;
        return this;
    }



    public boolean isReveal() {
        return reveal;
    }

    public void setReveal(boolean reveal) {
        this.reveal = reveal;
    }

    public AdBase setPGid(String... PGid) {
        this.PGid = PGid;
        return this;
    }

    public Activity getActivity() {
        return activity;
    }

    public void setActivity(Activity activity) {
        this.activity = activity;
    }

    public AdBase setKSid(Long... KSid) {
        this.KSid = KSid;
        return this;
    }

    public AdBase setKSid(String [] KSid) {
          Long[] longs=new Long[KSid.length];
          for (int i = 0; i < KSid.length; i++) {
              longs[i]=Long.parseLong(KSid[i]);
          }
        this.KSid = longs;
        return this;
    }


    public FrameLayout getFrameLayout() {
        return frameLayout;

    }

    public AdBase setFrameLayout(FrameLayout frameLayout) {
        this.frameLayout = frameLayout;
        return this;
    }

    public AdListener getListener() {
        return listener;
    }

    public String[] getPGid() {
        return PGid;
    }

    public Long[] getKSid() {
        return KSid;
    }

    public void load_(){
        load();
    }

    public String[] getBdid() {
        return Bdid;
    }

    public void setBdid(String[] bdid) {
        Bdid = bdid;
    }

    protected abstract void load();

    protected abstract void start();



}
